package src;

import java.util.Scanner;

public class Switch02 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入你的成绩");
//        float score = sc.nextFloat();
//        switch (score) {
//
//        }
        int score = sc.nextInt();
        // >= 90 and <= 100  A   < 90 and >= 80 B   < 80 and >= 70 C < 70 and >= 60 D  < 60 E
        // 91 / 10 = 9 100 / 10 = 10
        if (score >= 0 && score <= 100) {
//            switch (score / 10) {
//                case 10, 9:
////            case 9:
//                    System.out.println("A");
//                    break;
//                case 8:
//                    System.out.println("B");
//                    break;
//                case 7:
//                    System.out.println("C");
//                    break;
//                case 6:
//                    System.out.println("D");
//                    break;
//                default :
//                    System.out.println("E");
//            }
            switch (score / 10) {
                case 10, 9 -> System.out.println("A");
                case 8 ->
                    System.out.println("B");
                case 7 ->
                    System.out.println("C");
                case 6 ->
                    System.out.println("D");
                default ->
                    System.out.println("E");
            }
        } else {
            System.out.println("你输入的成绩并不合理");
        }
    }
}
